<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<script type="text/javascript">
//修改导航菜单选中状态
$("#nav li").click(function(){
	$(this).siblings().removeClass("active");
	$(this).addClass("active");
});
</script>
<!-- Navbar -->
		<nav class="navbar navbar-default">
			<div class="container">

				<div class="navbar-header">
					<button type="button" class="navbar-toggle collapsed"
						data-toggle="collapse" data-target="#navbar" aria-expanded="false"
						aria-controls="navbar">
						<span class="sr-only">Toggle navigation</span> <span
							class="icon-bar"></span> <span class="icon-bar"></span> <span
							class="icon-bar"></span>
					</button>
					<a href="${pageContext.request.contextPath}/index"><h1>
							Sbeam <img src="images/c1.png" alt=" " /> Game
						</h1></a>
				</div>
				
				<c:if test="${!empty login }">
					<div id="navbar" class="navbar-collapse collapse">
					<ul class="nav navbar-nav navbar-right" id="nav">
						<li class="hover-effect"><a href="${pageContext.request.contextPath}/index">首页</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/type">分类</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/palygame">试玩游戏</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/salesgame">售卖游戏</a></li>
						<li class="hover-effect"><a href="javascript:void(0);">${login.userName }</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/center">个人中心</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/logout">退出</a></li>
					</ul>
				</div>
				</c:if>
				
				<c:if test="${empty login }">
					<div id="navbar" class="navbar-collapse collapse">
					<ul class="nav navbar-nav navbar-right" id="nav">
						<li class="hover-effect"><a href="${pageContext.request.contextPath}/index">首页</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/type">分类</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/palygame">试玩游戏</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/salesgame">售卖游戏</a></li>
						<li class="hover-effect"><a href="${pageContext.request.contextPath }/developerlogin">开发者登录</a></li>
						<li class="hover-effect"><a href="#loginModal" data-toggle="modal">登录</a></li>
					</ul>
				</div>
				</c:if>
				

			</div>
		</nav>
		<!-- //Navbar -->